<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    div {
      width: 60px;
      height: 60px;
      margin: 5px;
      float: left;
    }

    .active {
      background-color: pink;
    }

    .item {
      font-size: 30px;
    }
  </style>
  <script src="index-copy.js"></script>
</head>

<body>
  <h1>eeeeeeeeeeeeeeee <span class="btn">小时了</span></h1>
  <h2>
    <span class="item">66</span>
    <span>66</span>
    <span>66</span>
    <span>66</span>
    <span>66</span>
    <span>66</span>
  </h2>
  <ul>
    <li>2222</li>
    <li>55555</li>
    <li>2222</li>
    <li>8888</li>
    <li>2222</li>
    <li>2222</li>
  </ul>
  <div style="background-color:blue;"></div>
  <div style="background-color:rgb(15,99,30);"></div>
  <div style="background-color:#123456;"></div>
  <div style="background-color:#f11;"></div>
  <span id="result"></span>
  <img src="https://pic.rmb.bdstatic.com/a51d142ac7625feda1002f0c739ae255.jpeg" alt="">
  <script>
    $(function () {
      $("div").click(function () {
        $("#result").html("背景颜色是 " + $(this).css("background-color"));
      })
      console.log($('div'));
      $('.btn').hover(function () {

        $(this).hide()
      }, function () {
        $(this).show()

      })
      $('li').on('click', function () {
        $(this).css('background', 'red')
        console.log($(this).index());
      }, false)
      $('li').eq(2).html('怎么办');
      $('div').attr('index-data', '1')
      $("h2").find("span").css({ "color": "red", "border": "2px solid red" });
      $("img").attr("width", "200");
      $("img").attr({ 'border': '5px solid red' });
      $('img').click(function () {
        console.log(55555555555555);
        console.log($(this).css('border'));
      })
      console.log($("div").attr('index-data'));
      $("div").add().goo()
      $("h2").find("span").click(function () {
        $(this).removeAll('active').addClass('active');
      })


    })

// $.get('http://api.jirengu.com/getWeather.php', { city: '北京' })
//   .then(data => console.log(data))
  </script>
</body>

</html>